import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home'
import Search from '@/pages/Search'
import Login from '@/pages/Login'
import Register from '@/pages/Register'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      component: Home,
      meta:{
        show:true
      }
    },
    {
      path: '/search/:keyword',
      component: Search,
      meta:{
        show:true
      },
      name:"search"
    }, {
      path: '/login',
      component: Login,
      meta:{
        show:false
      }
    },
    {
      path: '/register',
      component: Register,
      meta:{
        show:false
      }
    },
    {
      path:'*',
      redirect:'/home'
    }
  ]
})
